using System;
using System.Collections.Generic;
using System.Text;
using Evolution.Model.Interfaces;

namespace Evolution.Model.DAO
{
    public class Account : IAccount
    {
        private int _AccountKey;
        private string _UserName;
        private string _Password;
        private bool _GameManager;
        private AccountStatus _AccountStatus;
        private CharacterCollection _Characters;

        #region IAccount Members

        public int AccountKey
        {
            get
            {
                return _AccountKey;
            }
            set
            {
                _AccountKey = value;
            }
        }
        public string UserName
        {
            get
            {
                return _UserName;
            }
            set
            {
                _UserName = value;
            }
        }
        public string Password
        {
            get
            {
                return _Password;
            }
            set
            {
                _Password = value;
            }
        }
        public bool GameManager
        {
            get
            {
                return _GameManager;
            }
            set
            {
                _GameManager = value;
            }
        }
        public AccountStatus Status
        {
            get
            {
                return _AccountStatus;
            }
            set
            {
                _AccountStatus = value;
            }
        }
        public CharacterCollection Characters
        {
            get 
            { 
                if( _Characters == null )
                    _Characters = Character.GetCharactersForAccount(_AccountKey);

                return _Characters;
            }
        }

        public static IAccount GetByKey(int AccountKey)
        {
            return null;
        }

        public static IAccount GetByUserName(string UserName)
        {
            return null;
        }

        #endregion
    }
}
